class GameLogic
{
public:
	GameLogic();
	~GameLogic();

	static void conn_writecb(struct bufferevent *bev, void *user_data);
	static void conn_readcb(struct bufferevent *bev, void *user_data);
	static void conn_eventcb(struct bufferevent *bev, short events, void *user_data);
	static void signal_cb(evutil_socket_t sig, short events, void *user_data);
	static void listener_cb(struct evconnlistener *listener, evutil_socket_t fd, struct sockaddr *sa, int socklen, void *user_data);
	static DWORD WINAPI mainRun(LPVOID lp);

	void run();
	void stop();
public:
#ifdef WIN32
		HANDLE m_Handle;
#else
		pthread_t m_Handle;
#endif // WIN32

	struct event_base *m_pEventBase;
	struct evconnlistener *m_pLlistener;
	struct event *m_pSignal_event;
	struct event *m_pSignal_event1;
	struct event *m_pSignal_event2;
	struct sockaddr_in sin;
	static bool m_boRun;
};